/*
 * Place bean
 */
package com.spartancoder.accommodation.beans;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author andrei
 */
public class PlaceBean {

	private int placeId;
	private String name,  address;
	private int rooms,  placesPerRoom;
	private boolean available;

	public void fill(ResultSet rs) throws SQLException {
		setPlaceId(rs.getInt("place_id"));
		setName(rs.getString("name"));
		setAddress(rs.getString("address"));
		setRooms(rs.getInt("rooms"));
		setPlacesPerRoom(rs.getInt("places_per_room"));
		setAvailable(rs.getBoolean("available"));
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getPlaceId() {
		return placeId;
	}

	public void setPlaceId(int placeId) {
		this.placeId = placeId;
	}

	public int getPlacesPerRoom() {
		return placesPerRoom;
	}

	public void setPlacesPerRoom(int placesPerRoom) {
		this.placesPerRoom = placesPerRoom;
	}

	public int getRooms() {
		return rooms;
	}

	public void setRooms(int rooms) {
		this.rooms = rooms;
	}
}
